var msg = ["username","age","sex"];//定义了一个数组
var stdin  = process.stdin;
var index = 0;
var infor = [];
console.log(msg[0] + ":");

stdin.on("data",function(chunk){
    // console.log(chunk);//buffer是缓冲区二进制数据格式
    var str = chunk.toString("utf-8");
    // console.log(str);
    infor[index] = str;
    index++;
    if(index == 3){
        console.log(infor);
        process.exit();
    }
    console.log(msg[index] + ":");
})